<template>
    <view>
        <custom><template #backText>股东大会</template></custom>
        <navTabList ref="navTabList" :tab.sync="tab" :tap="(e, info, key)=>{$store.commit('userNavTo', '/article/info?article_id=' + info.article_id)}">
            <template #list="data">
                <nMenuItemTopBottom v-for="(info, key) in data.list" :key="key" :uri="'/article/info?article_id='+info.article_id">
                    <template #top>
                        {{info.title}}
                    </template>
                    <template #bottom>
                        <view>{{info.author_name}}</view>
                        <view>{{info.created_at}}</view>
                    </template>
                </nMenuItemTopBottom>
            </template>
        </navTabList>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                tab: {
                    cur: 0,
                    list: {
                        0: {
                            title: '公告',
                            uri: '/article/list',
                            data: {
                                category: 0
                            }
                        },
                        1: {
                            title: '活动',
                            uri: '/article/list',
                            data: {
                                category: 1
                            }
                        },
                        2: {
                            title: '分享',
                            uri: '/article/list',
                            data: {
                                category: 2
                            }
                        },
                    },
                    apiList: {}
                },
            }
        },
        onReady() {
            this.$refs.navTabList.listInit();
        },
        onReachBottom() {
            this.$refs.navTabList.listAdd();
        },
    }
</script>
